/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package py.com.peluq.model.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Diego_M
 */
@Embeddable
public class DetNtadebCrePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "prod_cod", nullable = false)
    private int prodCod;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ncr_cod", nullable = false)
    private int ncrCod;

    public DetNtadebCrePK() {
    }

    public DetNtadebCrePK(int prodCod, int ncrCod) {
        this.prodCod = prodCod;
        this.ncrCod = ncrCod;
    }

    public int getProdCod() {
        return prodCod;
    }

    public void setProdCod(int prodCod) {
        this.prodCod = prodCod;
    }

    public int getNcrCod() {
        return ncrCod;
    }

    public void setNcrCod(int ncrCod) {
        this.ncrCod = ncrCod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) prodCod;
        hash += (int) ncrCod;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DetNtadebCrePK)) {
            return false;
        }
        DetNtadebCrePK other = (DetNtadebCrePK) object;
        if (this.prodCod != other.prodCod) {
            return false;
        }
        if (this.ncrCod != other.ncrCod) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.com.peluq.model.entity.DetNtadebCrePK[ prodCod=" + prodCod + ", ncrCod=" + ncrCod + " ]";
    }
    
}
